<template>
  <div>
    成绩单:
    <p>语文：{{score1}}</p>
    <p>数学：{{score2}}</p>
    <p>英语：{{score3}}</p>
    <p>成绩总和:{{num}}</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      score1:90,
      score2:77,
      score3:66
    };
  },
  // computed好处：1.让代码模板更清晰2.有缓存
  computed:{
    num(){
      return this.score1+this.score2+this.score3
    }
  }
};
</script>

<style lang="scss" scoped>

</style>